package com.lin.handler;

import com.lin.common.rest.BaseReqMsg;
import com.lin.common.rest.BaseResMsg;
import com.lin.common.rest.ReqMsg;
import com.lin.common.rest.ResMsg;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import reactor.core.publisher.Mono;

@Component("modifyResponseBodyHandler")
public class ModifyResponseBodyHandler {
    private static final Logger log = LoggerFactory.getLogger(ModifyResponseBodyHandler.class);

    public Mono<BaseResMsg> modifyBody(ResMsg reqMsg) {
        log.info("BaseReqMsg: {}",BaseReqMsg.class.getSimpleName());
        BaseResMsg rm = new BaseResMsg();
        rm.setData(reqMsg.getClass().getSimpleName());
        return Mono.just(rm);
    }
}
